<?php include_once 'layout/heard.php'?>
<body>

<div class="content head_bg">
	<div class="head">
        <a href="javascript:void(0)" class="return_ico" onclick="javascript:history.go(-1);"><span></span></a>
        <h1>个人信息</h1>
        <a href="?md=riders&cl=riders&at=messageConten" class="news_ico"><span><?php echo $newCount; ?></span></a>
    </div>
</div>

<div class="content">
	<div class="qsrz grxx">
    	<form action="" method="get">
        	<div class="box">
                <div class="left">姓  名：</div>
                <div class="right">
                	<div class="grxx_text"><?php echo $ridersResult['name'];?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">性  别：</div>
                <div class="right">
                    <?php
                        if($ridersResult['sex'] == 1){
                            $sex = '男';
                        }else{
                            $sex = '女';
                        }
                    ?>

                	<div class="grxx_text"><?php echo $sex;?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">出生日期：</div>
                <div class="right">
                	<div class="grxx_text"><?php echo $ridersResult['birth_date'];?></div>
                </div>
            </div>

            <div class="box">
                <div class="left">年  龄：</div>
                <div class="right">
                	<div class="grxx_text"><?php echo $ridersResult['age'];?></div>
                </div>
            </div>

            <div class="box">
                <div class="left">昵  称：</div>
                <div class="right">
                    <div class="grxx_text"><?php echo $ridersResult['username'];?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">联系电话：</div>
                <div class="right">
                	<div class="grxx_text"><?php echo $ridersResult['tel'];?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">常住地址：</div>
                <div class="right">
                	<div class="grxx_text grxx_text2"><?php echo $ridersResult['province_name'].' '.$ridersResult['city_name'].' '.$ridersResult['area_name'];?><br><?php echo $ridersResult['address'];?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">服务城市：</div>
                <div class="right">
                	<div class="grxx_text"><?php echo $ridersResult['service_province_name'].' '.$ridersResult['service_city_name'].' '.$ridersResult['service_area_name'];?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">服务门店：</div>
                <div class="right">
                	<div class="grxx_text"><?php echo $ridersResult['shopname'];?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">身份证号：</div>
                <div class="right">
                	<div class="grxx_text"><?php echo $ridersResult['id_card'];?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">身份证照片：</div>
                <div class="right">
                	<p>身份证正面 参考照片</p>
                    <div id="sfzzp_zm" class="sfzzp_zm_img"><img src="webroot/file/riders/<?php echo $ridersResult['card_front_img'];?>" id="img0"></div>
                    <p style=" padding-top:8px;">身份证反面 参考照片</p>
                    <div id="sfzzp_zm2" class="sfzzp_zm_img"><img src="webroot/file/riders/<?php echo $ridersResult['card_back_img'];?>" id="img02"></div>
                </div>
            </div>
            <div class="box">
                <div class="left">健康证：</div>
                <div class="right">
                	<p>健康证 参考照片</p>
                    <div id="sfzzp_zm3" class="sfzzp_zm_img"><img src="webroot/file/riders/<?php echo $ridersResult['health_cards'];?>" id="img03"></div>
                </div>
            </div>
            <div class="box">
                <div class="left">健康证生效时间：</div>
                <div class="right">
                    <div class="grxx_text"><?php echo strstr($ridersResult['jkz_start'],' ',true);?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">健康证到期时间：</div>
                <div class="right">
                    <div class="grxx_text"><?php echo strstr($ridersResult['jkz_end'],' ',true);?></div>
                </div>
            </div>

            <div class="box">
                <div class="left">简历：</div>
                <div class="right">
                	<div class="grxx_text grxx_text2"><?php echo $ridersResult['resume'];?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">紧急联系人：</div>
                <div class="right">
                	<div class="grxx_text"><?php echo $ridersResult['urgency_cont_username'];?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">紧急联系人电话：</div>
                <div class="right">
                	<div class="grxx_text"><?php echo $ridersResult['urgency_cont_username_tel'];?></div>
                </div>
            </div>
            <div class="box">
                <div class="left">与本人关系：</div>
                <div class="right">
                	<div class="grxx_text"><?php echo $ridersResult['urgency_relation'];?></div>
                </div>
            </div>
        </form>
    </div>
</div>


<div class="group_tc_bg" id="zhty_pop">
    <div class="group_tc">
        <h3>很遗憾！</h3>
        <p>您的骑手资格已被门店停用，请联系门店人员，开启后才可恢复接单。</p>
        <div class="bnt">
            <a href="javascript:void(0)" class="btn1">暂不联系</a>
            <a href="javascript:void(0)" class="btn2">立即联系</a>
        </div>
    </div>
</div>


<div class="group_tc_bg" id="ridersT">
    <div class="group_tc">
        <h3>很遗憾！</h3>
        <p id="con"></p>
        <div class="bnt">
            <a href="javascript:void(0)" class="btn1">取消</a>
            <a href="?md=riders&cl=riders&at=riders_approve" class="btn2">再次认证</a>
        </div>
    </div>
</div>

<div class="group_tc_bg" id="ridersD">
    <div class="group_tc">
        <h3>很遗憾！</h3>
        <p>您当前尚未提交审核资料，请提交认证资料。</p>
        <div class="bnt">
            <a href="javascript:void(0)" class="btn1">取消</a>
            <a href="?md=riders&cl=riders&at=riders_approve" class="btn2">去认证</a>
        </div>
    </div>
</div>


<div class="group_tc_bg" id="ridersB">
    <div class="group_tc">
        <h3>很遗憾！</h3>
        <p>您提交审核资料不符合要求。</p>
        <div class="bnt">
            <a href="javascript:void(0)" class="btn1">取消</a>
            <a href="javascript:void(0)" class="btn2">确定</a>
        </div>
    </div>
</div>

<div class="group_tc_bg" id="ridersC">
    <div class="group_tc">
        <!--        <h3>很遗憾！</h3>-->
        <p>资料已提交 请耐心等待审核结果。</p>
        <div class="bnt">
            <a href="javascript:void(0)" class="btn1">取消</a>
            <a href="javascript:void(0)" class="btn2">确定</a>
        </div>
    </div>
</div>

<script>

    $(function () {
        $.ajax({
            url:"?md=riders&cl=riders&at=ridersT",
            type:"post",
            dataType:"json",
            data:{'tel':13888888888},
            success:function (d) {
                console.log(d)
                if( d.status == 1 && d.initiate == 2){  // 审核通过 但被停用
                    $("#zhty_pop").fadeIn();
                }
                if (d.status == 4) {                    // 审核通过 禁止接单
                    $("#zhty_pop").fadeIn();
                }

                if ( d.status == 10) {  // 没有提交审核资料 / 刚注册 = 10
                    $("#ridersD").fadeIn();
                }
                if(d.status == 0){      // 0 = 已经提交未审核
                    $("#ridersC").fadeIn();
                }

                if (d.status == 3){                     // 审核未通过
                    $("#con").html("骑手认证资料审核未通过，请查看未通过理由后，可重新填写再次提交认证。<br>未通过理由："+d.msg);
                    $("#ridersT").fadeIn();
                    $("#riderReg").show();
                }

                if (d.status == 2){                     // 审核未通过 不得申请
                    $("#ridersB").fadeIn();
                }

            }
        })
    })
</script>
<?php include_once 'layout/rfooter.php'?>